
<h1>仓库管理 - <span id="secondHeading">管理仓库</span></h1>
<% if @flash[:notice] -%>
                <div id="notice"><%= @flash[:notice] %></div>
        <% end -%>
		<TABLE border="0" id="LIST_TB">
	
	    <TR id="LIST_TB_TITLE">
	      <td>仓库名</td>
	      <td>电话</td>
	      <td>类型</td>
	      <td>地址</td>
	      <td colspan="2">相关操作</td>
	    </tr>
	    <%@stores.each do |store|%>
	    <TR id="LIST_TB_CONTENT1">
	      <td><%=store.name%></td>
	      <td><%=store.phone%></td>
	      <td><%if store.in_type==1%>入货仓库<br><%end%><%if store.out_type==1%>出货仓库<%end%> <%if store.in_type+store.out_type == 0%>普通仓库<%end%></td>
	      <td><%=store.address%></td>
		   <td><%=link_to(image_tag("../../../content/themes/classic/images/edit.gif"),{:action=>"edit_store",:id=>store.id})%></TD>
                   <td><%if store != nil && store.state == 'OP' %>
                       <%=link_to(image_tag("/images/stop.gif",:alt=>'停用仓库'),{:action=>"stop_store",:id=>store.id},{:confirm=>"你确定要停用该仓库吗?"})%> 
              <%else%>
              <%=link_to(image_tag("/images/restart.gif", :alt=>'启用仓库'),{:action=>"restart_store",:id=>store.id},{:confirm=>"你确定要启用该仓库吗?"})%> 
              <%end%>
                      </TD>
	    </tr>
	    <%end%>
		</TABLE>
<table>
        <tr>
                <td>
                        <input type="button" value="打印当前页" class="sub" onclick="openPrintWindow('LIST_TB')"/>
                        <input type="button" value="导出当前数据" class="sub" onclick="CellAreaExcel('LIST_TB')"/>
                </td>
        </tr>
</table>
